/*
 * UPMass.java
 *
 * Created on 2010-06-13, 21:50:11
 */

package JET.UtilPanels;

import JET.Centers.ControlCenter;
import JET.Frames.ArrowPanel;
import JET.Exceptions.DialogZeroMassException;
import JET.Centers.Graphics.GUICenter;
import JET.Frames.ArrowPanelListener;
import JET.StaticActions;
import JET.geom.Vec2d;
import JET.mygui.UtilTabsPane.UtilTabsPaneTab;
import java.awt.event.KeyEvent;

/**
 *
 * @author 057Ry
 */
public class UPMass extends javax.swing.JPanel implements UtilTabsPaneTab {

    static final ControlCenter CC = ControlCenter.getInstance();
    
    /** Creates new form UPMass */
    public UPMass() {
        initComponents();
        initArrowPanel();
    }

    public GUICenter.UtilTabs getId() {
        return GUICenter.UtilTabs.Mass;
    }

    public boolean isScrollable() {
        return true;
    }
    
    private void initArrowPanel() {
        arrowPanel = new ArrowPanel();
        arrowPanel.addArrowPanelListener( new ArrowPanelListener() {
            public void arrowPanelStateChanged(double newX, double newY) {
                velocityLengthTextField.setText( ""+arrowPanel.getLength() );
                velocityAngleTextField.setText( ""+Math.toDegrees(arrowPanel.getAngleX()) );

                Vec2d v = arrowPanel.getVector();
                v.scaleY(-1);
                StaticActions.setSelectedMassesVelocity(v, CC.getCurrentScene());
                CC.GUIC.repaintAllSceneTabs();
            }
        });

        velocityPanel.add(arrowPanel);
    }

    private void setNameByGUIValue() {
        StaticActions.setSelectedMassesName(nameTextField.getText(), CC.getCurrentScene());
    }
    private void setMassByGUIValue() {
        double value=0.;

        try {
            value = getMassFromTextField();
        }catch(NumberFormatException nfe) {
            System.out.println("Cannot parse this value into double number format ...");
            return;
        }

        StaticActions.setSelectedMassesMass(value, CC.getCurrentScene());
        CC.GUIC.repaintAllSceneTabs();
    }
    private void setVelocityByGUIValue() {
        Vec2d velocity = new Vec2d();
        try {
            Double.parseDouble(velocityAngleTextField.getText());
            Double.parseDouble(velocityLengthTextField.getText());
        }catch(NumberFormatException nfe) {
            System.out.println("Cannot parse this value into double number format ...");
            return;
        }

        velocity = arrowPanel.getVector();
        velocity.setY( velocity.getY()*-1 );

        StaticActions.setSelectedMassesVelocity(velocity, CC.getCurrentScene());
        CC.GUIC.repaintAllSceneTabs();
    }
    private void addVelocityByGUIValue() {
        Vec2d velocity = new Vec2d();
        try {
            Double.parseDouble(velocityAngleTextField.getText());
            Double.parseDouble(velocityLengthTextField.getText());
        }catch(NumberFormatException nfe) {
            System.out.println("Cannot parse this value into double number format ...");
            return;
        }

        velocity = arrowPanel.getVector();
        velocity.setY( velocity.getY()*-1 );

        StaticActions.addSelectedMassesVelocity(velocity, CC.getCurrentScene());
        CC.GUIC.repaintAllSceneTabs();
    }
    private double getMassFromSlider() {
        return (double)massSlider.getValue();
    }
    private double getMassFromTextField() {
        return Double.parseDouble( massTextField.getText() );
    }

    private void setPositionByGUIValue() {
        double x=0.0,y=0.0;
        boolean xIsOK = false, yIsOK = false;

        try {
            x = Double.parseDouble(positionXTextField.getText());
            xIsOK = true;
        } catch(NumberFormatException nfe) {}
        try {
            y = Double.parseDouble(positionYTextField.getText());
            yIsOK = true;
        } catch(NumberFormatException nfe) {}
        

        if (xIsOK)  StaticActions.setSelectedMassesPositionX(x, CC.getCurrentScene());
        if (yIsOK)  StaticActions.setSelectedMassesPositionY(y, CC.getCurrentScene());
        
        CC.GUIC.repaintAllSceneTabs();
    }

    public void setMassGUIValue(double mass) {
        massSlider.setValue( (int)mass );
        massTextField.setText(""+mass);
    }
    public void setPositionGUIValue(double x, double y){
        positionXTextField.setText(""+x);
        positionYTextField.setText(""+y);
    }
    public void setVelocityGUIValue(Vec2d vel) {
        arrowPanel.setArrowVector(vel, false);
        velocityAngleTextField.setText(""+Math.toDegrees(vel.getAngleX()));
        velocityLengthTextField.setText(""+vel.getMagnitude());
    }

    public void setMassText(String text) {
        massTextField.setText(text);
    }
    public void setPositionText(String text) {
        positionXTextField.setText(text);
        positionYTextField.setText(text);
    }
    public void setVelocityText(String text) {
        velocityAngleTextField.setText(text);
        velocityLengthTextField.setText(text);
    }

    public void bringFocusToMassTextField() {
        massTextField.requestFocus();
        massTextField.select(0, massTextField.getText().length());

    }
    public void bringFocusToVelocityPanel() {
        velocityPanel.requestFocus();
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel3 = new javax.swing.JPanel();
        positionXLabel = new javax.swing.JLabel();
        positionYLabel = new javax.swing.JLabel();
        positionXTextField = new javax.swing.JTextField();
        positionYTextField = new javax.swing.JTextField();
        jPanel4 = new javax.swing.JPanel();
        velocityPanel = new javax.swing.JPanel();
        velocityLengthLabel = new javax.swing.JLabel();
        velocityAngleLabel = new javax.swing.JLabel();
        velocityLengthTextField = new javax.swing.JTextField();
        velocityAngleTextField = new javax.swing.JTextField();
        addVelocityButton = new javax.swing.JButton();
        nameLabel = new javax.swing.JLabel();
        massTextField = new javax.swing.JTextField();
        massLabel = new javax.swing.JLabel();
        nameTextField = new javax.swing.JTextField();
        massSlider = new javax.swing.JSlider();

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("position"));
        jPanel3.setMaximumSize(new java.awt.Dimension(10, 10));

        positionXLabel.setText("X :");
        positionXLabel.setMaximumSize(new java.awt.Dimension(10, 10));

        positionYLabel.setText("Y :");
        positionYLabel.setMaximumSize(new java.awt.Dimension(10, 10));

        positionXTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        positionXTextField.setMaximumSize(new java.awt.Dimension(10, 10));
        positionXTextField.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                positionXTextFieldKeyPressed(evt);
            }
        });

        positionYTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        positionYTextField.setMaximumSize(new java.awt.Dimension(10, 10));
        positionYTextField.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                positionYTextFieldKeyPressed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(positionXLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(positionYLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(positionYTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)
                    .addComponent(positionXTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(positionXLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(positionXTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(positionYLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(positionYTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("velocity"));
        jPanel4.setMaximumSize(new java.awt.Dimension(10, 10));

        velocityPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        velocityPanel.setMaximumSize(new java.awt.Dimension(10, 10));
        velocityPanel.setLayout(new java.awt.BorderLayout());

        velocityLengthLabel.setText("length :");
        velocityLengthLabel.setMaximumSize(new java.awt.Dimension(10, 10));

        velocityAngleLabel.setText("angle :");
        velocityAngleLabel.setMaximumSize(new java.awt.Dimension(10, 10));

        velocityLengthTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        velocityLengthTextField.setMaximumSize(new java.awt.Dimension(10, 10));
        velocityLengthTextField.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                velocityLengthTextFieldKeyPressed(evt);
            }
        });

        velocityAngleTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        velocityAngleTextField.setMaximumSize(new java.awt.Dimension(10, 10));
        velocityAngleTextField.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                velocityAngleTextFieldKeyPressed(evt);
            }
        });

        addVelocityButton.setText("ADD VELOCITY");
        addVelocityButton.setMaximumSize(new java.awt.Dimension(10, 10));
        addVelocityButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addVelocityButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(velocityLengthLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(velocityAngleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(velocityAngleTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
                    .addComponent(velocityLengthTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)))
            .addComponent(velocityPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)
            .addComponent(addVelocityButton, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(velocityPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 180, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(velocityLengthLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(velocityLengthTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(velocityAngleTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(velocityAngleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(addVelocityButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(3, 3, 3))
        );

        nameLabel.setText("Name:");

        massTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        massTextField.setText(""+((double)massSlider.getValue()));
        massTextField.setToolTipText("type mass here");
        massTextField.setMaximumSize(new java.awt.Dimension(10, 10));
        massTextField.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                massTextFieldKeyPressed(evt);
            }
        });

        massLabel.setText("Mass:");

        nameTextField.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                nameTextFieldKeyPressed(evt);
            }
        });

        massSlider.setMaximum(20);
        massSlider.setMinimum(1);
        massSlider.setToolTipText("mass setting slider");
        massSlider.setValue(2);
        massSlider.setMaximumSize(new java.awt.Dimension(10, 10));
        massSlider.setMinimumSize(new java.awt.Dimension(10, 25));
        massSlider.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                massSliderStateChanged(evt);
            }
        });
        massSlider.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                massSliderMouseDragged(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(massSlider, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(massLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(massTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(nameLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(nameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nameLabel)
                    .addComponent(nameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(massLabel)
                    .addComponent(massTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(massSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        getAccessibleContext().setAccessibleName("Mass Properties");
    }// </editor-fold>//GEN-END:initComponents

    private void massSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_massSliderStateChanged
        massTextField.setText( ""+getMassFromSlider() );
}//GEN-LAST:event_massSliderStateChanged

    private void massTextFieldKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_massTextFieldKeyPressed
        if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
            double mass = getMassFromTextField();
            if (mass == 0) {
                mass = 1.0;
                DialogZeroMassException dialog = new DialogZeroMassException(CC.GUIC.getRootFrame(), true);
                dialog.setVisible(true);
            } else if(mass > 0) {
                massSlider.setValue( (int)mass );
                massTextField.setText(""+mass);
            } else {
                massSlider.setValue(1);
                massTextField.setText(""+mass);
            }
            setMassByGUIValue();
        }
}//GEN-LAST:event_massTextFieldKeyPressed

    private void velocityLengthTextFieldKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_velocityLengthTextFieldKeyPressed
        if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
            double length = Double.parseDouble(velocityLengthTextField.getText());
            arrowPanel.setLength(length);
        }
}//GEN-LAST:event_velocityLengthTextFieldKeyPressed

    private void velocityAngleTextFieldKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_velocityAngleTextFieldKeyPressed
        if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
            double angle = Double.parseDouble(velocityAngleTextField.getText());
            arrowPanel.setAngleX( Math.toRadians(angle));
        }
}//GEN-LAST:event_velocityAngleTextFieldKeyPressed

    private void addVelocityButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addVelocityButtonActionPerformed
        addVelocityByGUIValue();
}//GEN-LAST:event_addVelocityButtonActionPerformed

    private void positionXTextFieldKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_positionXTextFieldKeyPressed
        switch (evt.getKeyCode()) {
            case KeyEvent.VK_ENTER :
                setPositionByGUIValue();
                break;
        }
    }//GEN-LAST:event_positionXTextFieldKeyPressed

    private void positionYTextFieldKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_positionYTextFieldKeyPressed
        switch (evt.getKeyCode()) {
            case KeyEvent.VK_ENTER :
                setPositionByGUIValue();
                break;
        }
    }//GEN-LAST:event_positionYTextFieldKeyPressed

    private void nameTextFieldKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameTextFieldKeyPressed
        switch (evt.getKeyCode()) {
            case KeyEvent.VK_ENTER :
                setNameByGUIValue();
                break;
        }
    }//GEN-LAST:event_nameTextFieldKeyPressed

    private void massSliderMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_massSliderMouseDragged
        setMassByGUIValue();
    }//GEN-LAST:event_massSliderMouseDragged

    private ArrowPanel arrowPanel;

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton addVelocityButton;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JLabel massLabel;
    private javax.swing.JSlider massSlider;
    private javax.swing.JTextField massTextField;
    private javax.swing.JLabel nameLabel;
    private javax.swing.JTextField nameTextField;
    private javax.swing.JLabel positionXLabel;
    private javax.swing.JTextField positionXTextField;
    private javax.swing.JLabel positionYLabel;
    private javax.swing.JTextField positionYTextField;
    private javax.swing.JLabel velocityAngleLabel;
    private javax.swing.JTextField velocityAngleTextField;
    private javax.swing.JLabel velocityLengthLabel;
    private javax.swing.JTextField velocityLengthTextField;
    private javax.swing.JPanel velocityPanel;
    // End of variables declaration//GEN-END:variables

}
